package com.cskaoyan.shopping.converter;

import com.cskaoyan.shopping.dal.entitys.Item;
import com.cskaoyan.shopping.dto.TestProductDetailDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * @author zhaoxiangyang
 * @since 2022/09/21 10:05
 */

@Mapper(componentModel = "spring")
public interface ITestProductConverter {
    // item-->TestProductDetailDto
    @Mapping(source = "title",target = "productName")
    @Mapping(source = "image",target = "imgUrl")
    TestProductDetailDto itemDoToDetailDto(Item item);
}
